<?php

$cars = array("Volvo","BMW","Toyota");    // PHP5.x
echo $cars[1];
$cars[2] = "Audi";  // 修改元素值


echo "<pre>";
print_r($cars);  // 调试,发布产品的时候应该关掉、或注释掉。
echo count($cars);  // 计算数组的元素个数。

//$cars1 = ["Volvo","BMW","Toyota"];    //PHP5.4+
//echo $cars1[0];




?>